<!DOCTYPE html>
<HTML>
<HEAD><meta name="viewport" content="width=device-width, initial-scale=1">
<Title>Layer.setXData2</Title>
<link type='text/css' rel='Stylesheet' href="maxchartapi.css" />
</HEAD>
<body bgcolor="#FFFFFF" text="#000000" topmargin="0" leftmargin="0" rightmargin="0" marginwidth="0" marginheight="0">

<p class="heading0">ChartDirector 7.0 (Java Edition)</p>
<p class="heading1"><a href="Layer.htm">Layer</a>.<wbr>setXData2</p>
<hr class="separator">
<p class="heading2a">Usage</p>
<div class="content">
public void setXData2({double | java.util.Date} minValue, {double | java.util.Date} maxValue)
</div>
<p class="heading2">Description</p>
<div class="content">
Sets the x values of the data points in the data sets as evenly distributed in a range.<br><br>
This method is most useful when two layers contain data at different x-axis scale. An example is a line layer with one data point per minute, and another line layer with one data point per 5 minutes.<br><br>
In the above example, in one hour, the first layer will have 60 data points, while the second layer will have 12 data points. If enumerated x-scale is used, the x-axis will contain 60 positions evenly distributed. The 60 data points in the first layer will corresponds to the 60 positions in the x-axis, which is correct. However, the 12 data points in the second layer will corresponds to the first 12 positions on the x-axis, which is not the desired result.<br><br>
Instead, the 12 data points in the second layer should corresponds to positions 0, 5, 10, 15, .... A little thought will review that the 12 data points in the second layer should be distributed evenly among positions 0 - 55. The setXData2 method can be used to inform ChartDirector about the scaling used in the second layer.
</div>
<p class="heading2">Arguments</p>
<div class="content">
<div style="width:100%;box-sizing:border-box;">
<table border="1" cellpadding="5" cellspacing="0" width="100%"> 
<tr>
<th width="19%">Argument</th><th width="19%">Default</th><th>Description</th>
</tr>
<tr>
<td>minValue</td><td>(Mandatory)</td><td>The x value of the first point in a data set.</td></tr><tr><td>maxValue</td><td>(Mandatory)</td><td>The x value of the last point in the data set.</td>
</tr>
</table>
</div>
</div>
<p class="heading2">Return Value</p>
<div class="content">
None
</div>
<br><hr class="separator">
<div class="copyright">&copy; 2022 Advanced Software Engineering Limited. All rights reserved.</div>
</body>
</HTML>
